<div class="header">
  <back-Btn></back-Btn>
  项目付款
</div>
<div class="container finance task-review">
  <div class="list f_sk">
    <div user-info no="TaskReview.result.fileNo" depname="TaskReview.result.departmentName"
      date="TaskReview.result.applyDate" username="TaskReview.result.userName"></div>
    <div class="section">
      <div class="list-item flex" ng-show="TaskReview.result.endDate">
        <div class="w40 c9">支付日期</div>
        <div class="w60">{{ TaskReview.result.endDate | dateFmt }}</div>
      </div>
      <div class="list-item flex">
        <div class="c9 w40">项目编号</div>
        <div class="w60">{{ TaskReview.result.projectNo }}</div>
      </div>
      <div class="list-item flex">
        <div class="w40 c9">项目名称</div>
        <div class="w60" relative-module="project_store" module-no="{{ TaskReview.result.projectNo }}">
          {{ TaskReview.result.projectName }}
        </div>
      </div>
      <div class="list-item flex">
        <div class="c9 w40">扣款金额小计</div>
        <div class="w60">{{ TaskReview.result.deductAmount | NBFmt }}</div>
      </div>
      <div class="list-item flex">
        <div class="c9 w40">付款金额小计</div>
        <div class="w60">{{ TaskReview.result.payAmount | NBFmt }}</div>
      </div>
      <div class="list-item flex">
        <div class="c9 w40">支出总金额</div>
        <div class="w60">{{ TaskReview.result.totalAmount | NBFmt }}</div>
      </div>
      <div class="list-item flex">
        <div class="c9 w40">金额大写</div>
        <div class="w60">{{ TaskReview.result.amountInWorld }}</div>
      </div>

      <div class="list-item flex" ng-hide="TaskReview.result.completion==0">
        <div class="w40 c9">支付状态</div>
        <div class="w60" ng-switch="TaskReview.result.completion">
          <div ng-switch-when="0">未支付</div>
          <div ng-switch-when="1">已支付</div>
        </div>
      </div>
      <div class="list-item flex">
        <div class="c9 w40">付款事由</div>
        <div class="w60">{{ TaskReview.result.payReason }}</div>
      </div>
      <div class="list-item flex" ng-show="TaskReview.result.remark">
        <div class="w40 c9">备注</div>
        <div class="w60">{{ TaskReview.result.remark }}</div>
      </div>
      <!-- 附件 -->
      <div class="list-item list-item-textarea" file-list checked="true" file-data="TaskReview.result.attachment"></div>

      <!-- 自定义字段 -->
      <div checkuser-define field-map="TaskReview.result.customFields"></div>
      <div class="list table-list">
        <div class="info-title">扣款明细</div>
        <div class="table-item" ng-repeat="item in TaskReview.result.deductList">
          <div class="list-item">
            <div class="item-label">款项类别</div>
            <div class="flow-content">
              {{ item.deductType | getnamefromvalue }}
            </div>
          </div>
          <div class="list-item" ng-show="item.deductName">
            <div class="item-label">款项小类</div>
            <div class="flow-content">{{ item.deductName }}</div>
          </div>
          <div class="list-item">
            <div class="item-label">扣款金额</div>
            <div class="flow-content">{{ item.deductAmount | NBFmt }}</div>
          </div>
          <div class="list-item">
            <div class="item-label">扣款事由</div>
            <div class="flow-content">{{ item.deductRemark }}</div>
          </div>
          <div class="list-item" ng-show="item.costNo">
            <div class="item-label">待扣记录</div>
            <div class="flow-content" relative-module="project_cost" module-no="{{ item.costNo }}">
              {{ item.costNo }}
            </div>
          </div>
          <div class="file-upload" file-list file-data="item.deductAttachment"></div>
        </div>
        <div class="table-item" ng-repeat="item in deductList2">
          <div class="content" ng-class="{cur:$index==costindex}" ng-click="resetlist(0)"
            ng-swipe-left="swipe($index,0)" ng-swipe-right="swipe(-1,0)">
            <div class="list-item icon_more">
              <div class="item-label">款项类别</div>
              <div class="flow-content">
                {{ item.deductType | getnamefromvalue }}
              </div>
            </div>
            <div class="list-item icon_more">
              <div class="item-label">款项小类</div>
              <div class="flow-content">{{ item.deductName }}</div>
            </div>
            <div class="list-item">
              <div class="item-label">扣款金额</div>
              <div class="flow-content">{{ item.deductAmount }}</div>
            </div>
            <div class="list-item">
              <div class="item-label">扣款事由</div>
              <div class="flow-content">{{ item.deductRemark }}</div>
            </div>
            <div class="file-upload" file-list file-data="item.deductAttachment"></div>
          </div>
          <div class="delete_icon icon_del" ng-click="deletedItem($index)"></div>
        </div>
        <span class="c-blue list-item tc" ng-click="showCertificate()" ng-show="isShowDeducts">+添加</span>
      </div>
      <div class="list table-list">
        <div class="info-title">付款明细</div>
        <div class="table-item">
          <div class="list-item" ng-show="TaskReview.result.gatheringNo ">
            <div class="item-label">项目收款</div>
            <div class="flow-content" relative-module="project_gathering"
              module-no="{{ TaskReview.result.gatheringNo }}">
              {{ TaskReview.result.gatheringNo }}
            </div>
          </div>
          <div class="list-item" ng-show="TaskReview.result.contractName">
            <div class="item-label">合同名称</div>
            <div class="flow-content">
              {{ TaskReview.result.contractName }}
            </div>
          </div>
          <div class="list-item">
            <div class="item-label">付款金额</div>
            <div class="flow-content">
              {{ TaskReview.result.acceptAmount | NBFmt }}
            </div>
          </div>
          <div class="list-item">
            <div class="item-label">未开票金额</div>
            <div class="flow-content">
              {{ TaskReview.result.invoiceUncoverAmount | NBFmt }}
            </div>
          </div>
          <div class="list-item">
            <div class="item-label">工程款大类</div>
            <div class="flow-content">{{ TaskReview.result.payType1 }}</div>
          </div>
          <div class="list-item">
            <div class="item-label">工程款小类</div>
            <div class="flow-content">{{ TaskReview.result.payType2 }}</div>
          </div>
          <div class="list-item">
            <div class="item-label">收款人</div>
            <div class="flow-content">{{ TaskReview.result.acceptPerson }}</div>
          </div>
          <div class="list-item">
            <div class="item-label">收款人账号</div>
            <div class="flow-content">
              {{ TaskReview.result.acceptAccount }}
            </div>
          </div>
          <div class="list-item">
            <div class="item-label">收款人开户行</div>
            <div class="flow-content">{{ TaskReview.result.acceptBank }}</div>
          </div>
          <div class="list-item" ng-show="TaskReview.result.paymentInvoiceNo">
            <div class="item-label">发票编号</div>
            <div class="flow-content">
              <p ng-repeat="item in TaskReview.result.paymentInvoiceNo|arrfilter"
                relative-module="{{ TaskReview.result.invoiceType }}" module-no="{{ item }}">
                {{item}}
              </p>
            </div>
          </div>
          <div class="list-item" ng-show="TaskReview.result.commonContractNo">
            <div class="item-label">合同编号</div>
            <div class="flow-content" relative-module="{{ TaskReview.result.contractType }}"
              module-no="{{ TaskReview.result.commonContractNo }}">
              {{ TaskReview.result.commonContractNo }}
            </div>
          </div>
          <div class="list-item" ng-show="TaskReview.result.payRemark">
            <div class="item-label">付款事由</div>
            <div class="flow-content">{{ TaskReview.result.payRemark }}</div>
          </div>
          <div class="list-item" ng-show="TaskReview.result.notes">
            <div class="item-label">备注</div>
            <div class="flow-content">{{ TaskReview.result.notes }}</div>
          </div>
          <span ng-show="TaskReview.result.invoices&&TaskReview.result.invoices.length>0">
            <div class="info-title">开票明细</div>
            <div class="table-item" ng-repeat="item in TaskReview.result.invoices track by $index"
              style="margin: 5px 10px;border: 1px solid #eee;border-radius: 5px;">
              <div class="list-item">
                <div class="item-label">发票编号</div>
                <div class="flow-content" relative-module="Xm_InputInvoice" module-no="{{ item.invoiceNo }}">
                  {{ item.invoiceNo }}</div>
              </div>
              <div class="list-item">
                <div class="item-label">本次开票金额</div>
                <div class="flow-content">{{ item.coverAmount|NBFmt }}</div>
              </div>
            </div>
          </span>
        </div>
        <div class="table-item" ng-repeat="item in TaskReview.result.paymentList">
          <div class="list-item" ng-show="item.contractName ">
            <div class="item-label">合同名称</div>
            <div class="flow-content">
              {{ item.contractName }}
            </div>
          </div>
          <div class="list-item" ng-show="item.gatheringNo ">
            <div class="item-label">项目收款</div>
            <div class="flow-content" relative-module="project_gathering" module-no="{{ item.gatheringNo }}">
              {{ item.gatheringNo }}
            </div>
          </div>
          <div class="list-item">
            <div class="item-label">付款金额</div>
            <div class="flow-content">{{ item.acceptAmount| NBFmt }}</div>
          </div>
          <div class="list-item">
            <div class="item-label">未开票金额</div>
            <div class="flow-content">
              {{item.invoiceUncoverAmount | NBFmt }}
            </div>
          </div>
          <div class="list-item">
            <div class="item-label">工程款大类</div>
            <div class="flow-content">{{ item.payType1 }}</div>
          </div>
          <div class="list-item">
            <div class="item-label">工程款小类</div>
            <div class="flow-content">{{ item.payType2 }}</div>
          </div>
          <div class="list-item">
            <div class="item-label">收款人</div>
            <div class="flow-content">{{ item.acceptPerson }}</div>
          </div>
          <div class="list-item">
            <div class="item-label">收款人账号</div>
            <div class="flow-content">{{ item.acceptAccount }}</div>
          </div>
          <div class="list-item">
            <div class="item-label">收款人开户行</div>
            <div class="flow-content">{{ item.acceptBank }}</div>
          </div>
          <div class="list-item" ng-show="item.paymentInvoiceNo">
            <div class="item-label">发票编号</div>
            <div class="flow-content">
              <p ng-repeat="subitem in item.paymentInvoiceNo|arrfilter" relative-module="{{ item.invoiceType }}"
                module-no="{{ subitem }}">
                {{subitem}}
              </p>
            </div>
          </div>
          <div class="list-item" ng-show="item.commonContractNo">
            <div class="item-label">合同编号</div>
            <div class="flow-content" relative-module="{{item.contractType}}" module-no="{{ item.commonContractNo }}">
              {{ item.commonContractNo }}
            </div>
          </div>
          <div class="list-item" ng-show="item.payRemark">
            <div class="item-label">付款事由</div>
            <div class="flow-content">{{ item.payRemark }}</div>
          </div>
          <div class="list-item" ng-show="item.notes">
            <div class="item-label">备注</div>
            <div class="flow-content">{{ item.notes }}</div>
          </div>
          <span ng-show="item.invoices&&item.invoices.length>0">
            <div class="info-title">开票明细</div>
            <div class="table-item" ng-repeat="subitem in item.invoices track by $index"
              style="margin: 5px 10px;border: 1px solid #eee;border-radius: 5px;">
              <div class="list-item">
                <div class="item-label">发票编号</div>
                <div class="flow-content" relative-module="Xm_InputInvoice" module-no="{{ subitem.invoiceNo }}">
                  {{ subitem.invoiceNo }}</div>
              </div>
              <div class="list-item">
                <div class="item-label">本次开票金额</div>
                <div class="flow-content">{{ subitem.coverAmount|NBFmt }}</div>
              </div>
            </div>
          </span>
        </div>
      </div>
    </div>
    <div payment-list form-key="formKey" data="TaskReview.result"></div>
    <!-- 审查日志 -->
    <div log-list taskid="process_id"></div>
  </div>
</div>
<!-- 扣款明细 -->
<div class="list tablestyle pickceritem" ng-show="showCerPicker">
  <div class="list-item f_sk">
    <div class="grid list-content icon_enter required">
      <div class="col-1-4">款项类别</div>
      <div class="col-3-4">
        <select name="sex" id="sexSelect" ng-model="picker.deductType" ng-change="costTypechange()"
          ng-options="item.value as item.key for item in costTypeList">
          <option value="">选择款项类型</option>
        </select>
      </div>
    </div>
    <div class="grid list-content icon_enter">
      <div class="col-1-4">款项小类</div>
      <div class="col-3-4">
        <select ng-model="picker.deductName" ng-options="item.value as item.key for item in costsubTypeList">
        </select>
      </div>
    </div>
    <div class="grid list-content required">
      <div class="col-1-4">扣款金额</div>
      <div class="col-3-4">
        <input type="text" tel-directive ng-model="picker.deductAmount" />
      </div>
    </div>
    <div class="grid list-content required">
      <div class="col-1-4">扣款事由</div>
      <div class="col-3-4">
        <input type="text" ng-model="picker.deductRemark" />
      </div>
    </div>
    <div class="file-upload" file-upload file-data="picker.deductAttachment" maxnum="1"></div>
  </div>
  <div class="pickceritem-btn tc flex">
    <div class="cancel" ng-click="closePicker()">取消</div>
    <div class="confirm" ng-click="addCertificate(picker)">确定</div>
  </div>
</div>